README for "Higher Education and Cultural Liberalism"
Apfeld, Coman, Gerring and Jessee
Journal of Politics


The results presented in the paper are based on four different datasets:
- the scores on the Romanian baccalaureate examination between 2004 and 2019 (bac_scores.Rdata)
- a survey of Romanians conducted by the authors (CulturalLiberalismDataJOP.RData)
- World Values Survey 7 (WVS_Cross-National_Wave_7_Stata_v1_5.dta)
- Short, anonymised version of the bac results dataset (replication_dataset.dta)
- the Barro-Lee Educational Attainment Dataset (BL2013_MF_v2.2.csv)

These datasets (with some modifications to ensure anonymity, none of which affects the results of the paper) are included here. To reproduce the paper's results, you should ensure that all datasets as well as the four code files are all downloaded to the same directory before running the code. Also note that some packages (described at the top of the respective code files) must be installed before running the code.

Below is a description of the code files and what results they produce:

"figure_1_2.R"
R code that reproduces all results based on the Bac test results. This includes Figure 1 and Figure 2 in the main text. Note that "rdplotdensity_two_lines.R" provides a modified plotting function required to produce Figure 2 and this file should be downloaded in the same directory as other code files (formally, it must be in R's working directory when "figure_1_2.R" is run in order to produce the figure). Requires data file "bac_scores.Rdata"

"JOP-cultural-liberalism-Paper-Replication.R"
R code that reproduces all results based on the survey of Romanians used for the regression discontinuity analyses in the paper. This includes from the main paper: 
Table 1, Figure 3, Table 2, Table 3, Table 4, Table 5
And from the appendix: Table B1, Figure C1, Table C1, Figure C2, Figure D1, Figure D2, Table D1, Table D2, Table D3, Figure D3, Figure D4, Figure D5, Figure E1, Table I1, Table I2, Table I3
Requires data file "CulturalLiberalismDataJOP.RData"

"reproduce_stata.do"
Stata code that reproduces Tables B2, B4, B5, F1, and Figure F2 from the paper. Requires data files WVS_Cross-National_Wave_7_Stata_v1_5.dta and replication_dataset.dta


"figure_f1.R"
R code that reproduces figure F1 in the Appendix. This script automatically downloads the Barro-Lee dataset used to plot the percentage of the population of each country with partial or complete tertiary education.
